package com.example.canvastest;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

public class MainActivity extends Activity {
	private Intent intent;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        
        intent = new Intent(this, AccelerometerService.class);
        startService(intent);
    }
    
    @Override
    protected void onDestroy() {
        super.onDestroy();
        Log.d("onDestroy", "stopService");
        stopService(intent);
    }
}
